home *** CD-ROM | disk | FTP | other *** search
- /*
- File: icm2.c
- Contains: Main Function
- Written by: DTS and QT Engineering
- Copyright: © 1992-1994 by Apple Computer, Inc., all rights reserved.
- Change History (most recent first):
- <1> 12/4/94 khs changed the format of the file to the new look and feel
- To Do:
- */
-
-
- // INCLUDE FILES
- #include "icm.h"
-
-
- // MAIN FUNCTION
- void main(void)
- {
- WindowPtr displayWindow;
- Rect windowRect;
- PicHandle pic;
- long stupid;
-
- InitGraf(&qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(nil);
- MaxApplZone();
-
- SetRect(&windowRect, 0, 0, 256, 256);
- OffsetRect(&windowRect, // middle of screen
- ((qd.screenBits.bounds.right - qd.screenBits.bounds.left) - windowRect.right) / 2,
- ((qd.screenBits.bounds.bottom - qd.screenBits.bounds.top) - windowRect.bottom) / 2);
- displayWindow = NewCWindow(nil, &windowRect, "\pImage", true, 0, (WindowPtr) - 1, true, 0);
- if (displayWindow)
- {
- SetPort(displayWindow);
- SequenceSave();
- SequencePlay();
- }
- pic = GetQTCompressedPict((CGrafPtr)displayWindow);
-
- EraseRect(&((CGrafPtr)displayWindow)->portRect);
-
- Delay(30, &stupid);
- if (pic)
- DrawPicture(pic, &((CGrafPtr)displayWindow)->portRect);
- else
- DebugStr("\pGetQTCompressedPict failed");
- while (!Button())
- ;
-
- }
-
-
-